<include file="Common:header" />
<!-- /. NAV SIDE  -->
<include file="Common:left" />
<!-- /. NAV SIDE  -->
<div id="page-wrapper">
	<div class="header">
		<h1 class="page-header">
			课程管理 <small>Welcome {$Think.config.system_tag}</small>
		</h1>
		<ol class="breadcrumb">
			<li><a href="{:U('Index/index')}">首页</a></li>
			<li class="active">课程列表</li>
			<div style="float:right"><a href="#" onclick="openlayer('添加课程','{:U('Course/addCourse')}')">添加课程</a></div>
		</ol> 
	</div>
	<div id="page-inner">
		<div class="row">
			<div class="col-xs-12">
				<!--Search content-->
				<div class="panel panel-default" style="margin-bottom:0px; border-bottom:none">
					<div class="panel-body">
						<form class="layui-form" action="{:U('Course/courseList')}" method="post">
							<div class="layui-form-item">
							    <label class="layui-form-label" style="width:auto;">所属场馆</label>
								<div class="layui-input-inline">
									<select name="store_id" lay-verify="">
										<option value="">请选择</option>
										<notempty name="storeList">
											<volist name="storeList" id="vo">
												<option value="{$vo.id}" <if condition="($filter['store_id'] eq $vo['id'])">selected</if>>{$vo.title}</option>
											</volist>
										</notempty>
									</select>
								</div>
								<label class="layui-form-label" style="width:auto;">名称</label>
								<div class="layui-input-inline">
									<input value="{$filter.title}" type="text" name="title" placeholder="请输入名称" autocomplete="off" class="layui-input">
								</div>
								<div class="layui-input-inline" style="width:auto;">
									<button type="submit" class="btn btn-default">搜索</button>
								</div>
							</div>
						</form>
					</div>
				</div>
				<!--Search content-->
				<!--Formlist content-->
				<div class="panel panel-default">
					<div class="panel-body">
						<div class="table-responsive">
							<table class="table table-hover">
								<thead>
									<tr>
										<th>ID</th>
										<th>所属场馆</th>
										<th>名称</th>
										<th>分类</th>
										<th>教练</th>
										<th>教室</th>
										<th>上课人数</th>
										<th>已预约人数</th>
										<th>上课时间</th>
										<th>状态</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody>
									<volist name="list" id="vo">
										<tr>
											<td style="line-height:30px">{$vo.id}</td>
											<td style="line-height:30px">{$vo.store_name}</td>
											<td style="line-height:30px">{$vo.title}</td>
											<td style="line-height:30px">{$vo.cate_name}</td>
											<td style="line-height:30px">{$vo.coach_name}</td>
											<td style="line-height:30px">{$vo.classroom_name}</td>
											<td style="line-height:30px">{$vo.nums}/{$vo.t_nums}</td>
											<td style="line-height:30px">{$vo.numsd|default='0'}/{$vo.t_numsd|default='0'}</td>
											<td>{$vo.begin_time}<div style="line-height:0px; text-align:center"></div>{$vo.end_time}</td>
											<td>
											<if condition="$vo.status eq 1">
											启用
											<else />
											停用
											</if>
											</td>
											<td>
											<a href="javascript:void(0)" class="layui-btn layui-btn-xs layui-btn-normal" onclick="openlayer('修改','{:U('Course/editCourse',array('id'=>$vo['id']))}');return false;">修改</a><a href="javascript:void(0)" class="layui-btn layui-btn-xs layui-btn-danger" onclick="ajaxConfirm('确定要删除吗?','{:U('Course/deleteCourse',array('id'=>$vo['id']))}')">删除</a>
											</td>
										</tr>
									</volist>
								</tbody>
							</table>
							{$page}
						</div>
					</div>
				</div>
				<!--Formlist content-->
			</div>
		</div>
	</div>
	<include file="Common:foot" />
	<script>
		layui.use('form', function(){
		  var form = layui.form;
		});
	</script>
	 <!-- /. PAGE INNER  -->
</div>
<include file="Common:footer" />
    